<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
 <meta charset="utf-8">
 <title>待签收督办</title>
 <meta name="renderer" content="webkit">
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 <link rel="stylesheet" href="../layui/css/layui.css" th:href="@{../layui/css/layui.css}" media="all">
<link href="favicon.ico" rel="shortcut icon">
</head>
<script th:src="@{../layui/layui.js}" charset="utf-8"></script>

<body>

<table class="layui-hide" id="demo" lay-filter="test"></table>



<script>
layui.use(['table','layedit','form','laydate'], function(){
	  var table = layui.table
	  var layedit = layui.layedit
	  ,$ = layui.jquery;
	  var form = layui.form   //form表单
	  var index = layedit.build("textarea", "content");
	  var laydate = layui.laydate //日期 
	  
//执行一个 table 实例
	table.render({
	  elem: '#demo'
	  ,height: 'full-210'
	  //,cellMinWidth: 50
	  ,url: 'showSuperVisionWaitDirectReply' //数据接口
		  ,response: {
				statusCode: 200 //规定成功的状态码，默认：0
				} 
	  ,page: true
	  ,even:true	
	  //,page: true
	  //,title: '新闻表'
	  ,limit:20
	  ,toolbar:'#toolbarDemo'  //开启工具栏
	  ,cols: [
		  [ //表头
		{ type: 'numbers', title: '序号' }
	    /* ,{field: 'svid', title: '序号', sort: true, fixed: 'left', width:50} */
	    ,{field: 'svTitle', title: '督办标题'}
	    ,{field: 'svContent', title: '督办内容', width:200}
	    ,{field: 'sname', title: '督办类型', width:120}
	    /* ,{field: 'sid', title: '督办类型', width:120}
	    ,{field: 'did', title: '督办类型', width:120} */
	    ,{field: 'dname', title: '督办部门', width:130}
	    ,{field: 'startTime', title: '发起督办时间'}
	    ,{field: 'confirmTime', title: '签收时间'}
	    ,{field: 'endTime', title: '截止时间'}
	    ,{field: 'stid', title: '督办状态',width:100}
	    ,{field: 'sendLeader', title: '通知分管领导'}
	    ,{field: 'replices', title: '回复次数',width:100}
	    /* ,{field: 'pressMsg', title: '催促确认提示消息',width:100} */
	    ,{fixed: 'right', title:'操作', toolbar: '#barDemo',width:260}
	 	 ]
		]
	});

	});
</script>


 <!------------------------------------------------ 部门正职直接提交处理报告 ----------------------------------------------------->
<form class="layui-form layui-form-pane1" lay-filter="updateData" id="update" action="/svr/dutyNewReply" method="post"  hidden="true">	
 	<input type="hidden" name="svid">

  </div>
   <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">添加督办事件处理报告</label>
    <div class="layui-input-block">
      <textarea placeholder="请输入督办事件处理报告" class="layui-textarea" name="dutyidea"></textarea>
    </div>
  </div>

  <!-- <input type="hidden" name="yesorno" value="1"> -->
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="first">确认已处理</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>


 <!------------------------------------------------ 驳回 ----------------------------------------------------->
<!-- <form class="layui-form layui-form-pane1" lay-filter="updateData" id="update" action="/svr/dutyupdate" method="post"  hidden="true">	
 	<input type="hidden" name="svid">

  </div>
   <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">审核意见</label>
    <div class="layui-input-block">
      <textarea placeholder="请输入驳回原因" class="layui-textarea" name="dutyidea"></textarea>
    </div>
  </div>

  <input type="hidden" name="yesorno" value="2">
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="first">审核驳回</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form> -->


<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="update">添加处理报告</a>
</script>

<script type="text/javascript" th:inline="javascript">  //用javascript获取model中数据
layui.use(['table', 'form', 'layedit', 'laydate'], function(){
	  var form = layui.form   //form表单
	  var layer = layui.layer  //弹出层
	  var $=layui.$;
  	  var table = layui.table;
  //监听工具条
  table.on('tool(test)', function(obj){
    var data = obj.data;
    var svid = data.svid;
    if(obj.event === 'update'){
    	//layer.alert(JSON.stringify(data));
    	//1.获取这行数据
    	//2.填充form
    	form.val("updateData",data);
    	//首先需要使用lay-value来确定需要设置哪个元素自动选择
    	
    	//将部门选中状态改为之前的
    	layer.open({
    		type:1,
			title:'添加审核回复信息',
			area:'800px',
			anim: 1,
			skin: 'layui-layer-lan',
			content:layui.$('#update'),	
    	}) 
    }/* else if(obj.event === 'reject'){
    	//layer.alert(JSON.stringify(data));
    	//1.获取这行数据
    	//2.填充form
    	form.val("updateData",data);
    	//首先需要使用lay-value来确定需要设置哪个元素自动选择
    	
    	//将部门选中状态改为之前的
    	layer.open({
    		type:1,
			title:'驳回督办',
			area:'800px',
			anim: 1,
			skin: 'layui-layer-lan',
			content:layui.$('#reject'),	
    	}) 
    } */
  });
});
</script>
</body>
</html>